package com.yuhanginfo.modules.web.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yuhanginfo.common.persistence.Page;
import com.yuhanginfo.common.service.WebCrudService;
import com.yuhanginfo.modules.web.dao.WebPayHistoryDao;
import com.yuhanginfo.modules.web.entity.WebPayHistory;

/**
 * 交易历史Service
 * @author lvls
 * @version 2017-09-21
 */
@Service
@Transactional(readOnly = true)
public class WebPayHistoryService extends WebCrudService<WebPayHistoryDao, WebPayHistory> {

	@Autowired
	private WebPayHistoryDao payHistoryDao;
	
	public WebPayHistory get(String id) {
		return super.get(id);
	}
	
	public List<WebPayHistory> findList(WebPayHistory payHistory) {
		return super.findList(payHistory);
	}
	
	public Page<WebPayHistory> findPage(Page<WebPayHistory> page, WebPayHistory payHistory) {
		return super.findPage(page, payHistory);
	}
	
	@Transactional(readOnly = false)
	public void save(WebPayHistory PayHistory) {
		super.save(PayHistory);
	}
	
	@Transactional(readOnly = false)
	public void delete(WebPayHistory PayHistory) {
		super.delete(PayHistory);
	}

	public WebPayHistory getByPayCodeAndPayResult(String string, String code) {
		return payHistoryDao.getByPayCodeAndPayResult(string, code);
	}
	
}